Network devices in a network use time for various purposes. Network devices, including host devices and network infrastructure devices, can use the current time for purposes internal to an individual device, such as for example to apply a timestamp to a file when the file is created or modified, to apply timestamps to searches and other activity in a database, to apply timestamps to activities recorded in log files, and/or to track a current up time (how long the device has been powered on), among other things.
Network devices can also use the current time for external purposes, including inserting timestamps into network packets and attaching timestamps to events that are communicated to the network. A network device can, for example, attach a timestamp to a packet when transmitting the packet. As another example, a network device can extract a timestamp from a packet received from the network, and compare the extracted timestamp against a time being maintained by the network device.
Timestamps can further be used to analyze the performance of a network. For example, timestamps can be used to measure the latency across the network. Latency across the network can be measured, for example, as an average amount of time a packet needed to traverse the network from a source device to a destination device. Timestamps can also, for example, be used to measure packet throughput, that is, the number of packets that can cross the network at a given moment.
Generally, network devices each maintain time individually. A network device can have an internal clock circuit that is driven, for example, by a crystal oscillator. The clock circuit can increment every second, every millisecond, or at some fraction of a second. At any given moment, the clock circuit can provide the current time as a numerical value. The numerical value can then be inserted into file system records, database records, log files, and/or packets.